/**
 * Copyright (C) 2013  Mykola Bespaliuk
 */
var _gaq = _gaq || [];
_gaq.push( ['_setAccount', 'UA-29141582-1'] );
_gaq.push( ['_trackPageview'] );

( function() {
  var ga = document.createElement( 'script' ); ga.type = 'text/javascript'; ga.async = true;
  ga.src = 'https://ssl.google-analytics.com/ga.js';
  var s = document.getElementsByTagName( 'script' )[0]; s.parentNode.insertBefore( ga, s );
} )();

var analytics = analytics || {};

analytics.services = {
    keep_long_url: "none",
    use_goo_gl: "Google",
    use_tiny_url: "TinyUrl"
};
analytics.links = {
    page: "Page link",
    inPage: "In page link",
    frameUrl: "Frame link"
};

analytics.trackMenuClick = function() {
    _gaq.push(['_trackEvent', 'Menu', 'Click']);
};

analytics.trackLinkType = function( type ) {
    _gaq.push(['_trackEvent', 'Link', 'Copied', type]);
};

analytics.trackHotKeyUse = function( keyName ) {
    _gaq.push(['_trackEvent', 'Hotkey', 'Press', keyName]);
};

analytics.trackServiceUsed = function ( serviceName ) {
    _gaq.push(['_trackEvent', 'Service', 'Use', serviceName]);
};

analytics.trackTinyUrlVisit = function() {
    _gaq.push(['_trackEvent', 'TinyUrl', 'Visit']);
};

analytics.trackGooGlVisit = function() {
    _gaq.push(['_trackEvent', 'Googl', 'Visit']);
};